<script setup>
import { useMenu } from '@/utils/menuUtils';

const { items, current, doMenuClick } = useMenu();
</script>

<template>
  <div id="content_page_header">
    <a-row :wrap="false">
      <a-col flex="250px">
        <router-link to="/">
          <div class="title_bar">
            <img class="logo" src="../assets/logo.png" alt="logo" />
            <div class="title">讯界通览</div>
          </div>
        </router-link>
      </a-col>
      <a-col flex="auto">
        <a-menu v-model:selectedKeys="current" mode="horizontal" :items="items" @click="doMenuClick" style="background: transparent;" />
      </a-col>
      <!-- 用户信息展示栏 -->
      <a-col flex="120px">
        <div>
          <div>
            <a-button type="primary" href="#">登录</a-button>
          </div>
        </div>
      </a-col>
    </a-row>
  </div>
</template>

<style scoped>
#content_page_header {
  padding-inline: 16px;
}

#content_page_header .title_bar {
  display: flex;
  align-items: center;
  margin-inline: 15px;
}

.title {
  color: black;
  font-size: 18px;
  margin-inline: 12px;
}

.logo {
  height: 48px;
  margin-right: 5px;
}
</style>
